Add uWebSockets.js — native C++ HTTP engine for Node.js#254
Add uWebSockets.js — native C++ HTTP engine for Node.js#254MDA2AV merged 1 commit intoMDA2AV:mainfrom
Conversation
uWebSockets.js v20.61.0 by Alex Hultman / uNetworking AB. Written in C++, exposed as a native V8 addon — bypasses Node's HTTP stack entirely. Uses µSockets event loop with epoll for high-performance HTTP/WebSocket serving. Multi-core via Node cluster module (SO_REUSEPORT). Type: engine Language: JS Tests: baseline, pipelined, limited-conn Validation: 7/7 passed
|
@alexhultman doesnt exist |
|
/benchmark -f uwebsockets |
|
🚀 Benchmark run triggered for |
|
Oh good catch — looks like @alexhultman's GitHub account doesn't exist anymore (or was renamed). The author goes by Alex Hultman and runs the uNetworking org. I'll update the PR description to reference the org instead. The implementation itself should be fine regardless — happy to adjust anything else if needed! |
Benchmark ResultsFramework: Comparison with mainNo results found for Full log |
Benchmark AnalysisThese numbers are wild 🔥
20M pipelined — that puts it right at the top of the leaderboard. Zero 5xx across all profiles, clean run. One note: the limited-conn 4096c run 1 has a gcannon counter underflow warning ( Only subscribed to baseline/pipelined/limited-conn right now — could expand to more tests later if there's interest. |
|
/benchmark -f uwebsockets --save |
|
🚀 Benchmark run triggered for |
uWebSockets.js
Engine entry for µWebSockets.js v20.61.0 by Alex Hultman / uNetworking AB.
What is it?
uWebSockets.js is a native C++ HTTP/WebSocket server exposed to Node.js as a V8 addon. It bypasses Node's built-in HTTP stack entirely — the HTTP parsing, event loop, and socket handling all happen in C++ via the µSockets library (epoll-based). It's the engine behind Bun's HTTP server and consistently tops TechEmpower benchmarks.
7k+ stars, established since 2016, fuzz-tested via OSS-Fuzz.
Implementation details
Validation
All baseline (GET/POST/chunked), anti-cheat randomized, and pipelined tests pass.
Notes
res.cork()for batching header+body writes (recommended by uWS docs)res.onAborted()registered before body reading per uWS requirementsreq.getQuery()— returns raw query stringcc uNetworking — would love to see how uWS.js performs on the HttpArena benchmark hardware!